package com.fulihui.systemcore.api;

import com.fulihui.systemcore.dto.VisitRecordDTO;
import com.fulihui.systemcore.request.callcenter.VisitRecordCreateRequest;
import com.fulihui.systemcore.request.callcenter.VisitRecordQueryRequest;
import com.fulihui.systemcore.request.callcenter.VisitRecordUpdateRequest;
import org.near.servicesupport.request.TPageRequest;
import org.near.servicesupport.request.TRequest;
import org.near.servicesupport.result.BaseResult;
import org.near.servicesupport.result.TMultiResult;
import org.near.servicesupport.result.TPageResult;
import org.near.servicesupport.result.TSingleResult;

/**
 * 建议记录服务
 * Created by leeson on 2016/6/6.
 */
public interface VisitRecordService {
    /**
     * 通过ID查询来访信息
     *
     * @param request 主键id
     * @return 返回单个来访模型 {@link VisitRecordDTO}
     */
    TSingleResult<VisitRecordDTO> querySingle(TRequest<Long> request);

    /**
     * 创建来访记录
     *
     * @param request {@link VisitRecordCreateRequest}
     * @return 服务调用结果 {@link BaseResult}
     */
    BaseResult create(TRequest<VisitRecordCreateRequest> request);

    /**
     * 修改来访记录
     *
     * @param request {@link VisitRecordUpdateRequest}
     * @return 服务调用结果 {@link BaseResult}
     */
    BaseResult update(TRequest<VisitRecordUpdateRequest> request);

    /**
     * 分页查询来访记录
     *
     * @param request {@link VisitRecordQueryRequest}
     * @return 返回分页结果 {@link VisitRecordDTO}
     */
    TPageResult<VisitRecordDTO> queryPage(TPageRequest<VisitRecordQueryRequest> request);

    /**
     * 按条件查询所有来访记录
     *
     * @param request {@link VisitRecordQueryRequest}
     * @return 返回所有符合条件的记录 {@link VisitRecordDTO}
     */
    TMultiResult<VisitRecordDTO> queryAll(TRequest<VisitRecordQueryRequest> request);
}
